\documentclass[a4paper,twoside]{ctexart}
\usepackage{geometry}
\geometry{margin=1cm,vmargin={0pt,1cm}}
\setlength{\topmargin}{-2cm}
\setlength{\paperheight}{23cm}
\setlength{\paperwidth}{18cm}
\setlength{\textheight}{19.6cm}
\setlength{\textwidth}{15cm}
\usepackage{makecell}
\usepackage{fancyhdr}
\usepackage{siunitx}
\usepackage{amssymb}
\usepackage{indentfirst}
\setlength{\parindent}{0.5em}

\pagenumbering{arabic}

% useful packages.
\usepackage{multirow}
\usepackage{caption}
\usepackage{mathrsfs}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{enumerate}
\usepackage{xcolor,graphicx,float,subfigure}
\usepackage{epstopdf}
\usepackage{multicol}
\usepackage{fancyhdr}
\usepackage{layout}
\usepackage{listings}
\usepackage{diagbox}
\lstset{language=Matlab}
\lstset{breaklines}
\lstset{extendedchars=false}
\usepackage[colorlinks,linkcolor=blue]{hyperref}
\usepackage{xcolor}
\usepackage{cite}
\usepackage[numbers,sort&compress]{natbib}
\setcitestyle{open={},close={}}
%\usepackage{natbibspacing}
%\renewcommand{\refname}{}
\usepackage{anyfontsize}

% English theorem environment
\theoremstyle{definition}
\newtheorem{proposition}[section]{Proposition}
\newtheorem{corollary}[section]{Corollary}
\newtheorem{definition}{Definition}[section]
\newtheorem{remark}[section]{Remark}
\newtheorem{example}[definition]{Example}
\newtheorem{exercise}[definition]{Exercise}
\newtheorem{theorem}[definition]{Theorem}
\newtheorem{lemma}[definition]{Lemma}
\newenvironment{solution}{\begin{proof}[Solution]}{\end{proof}}
\renewcommand{\proofname}{\noindent Proof}
% some common command
\newcommand{\dif}{\mathrm{d}}
\newcommand{\avg}[1]{\left\langle #1 \right\rangle}
\newcommand{\pdfrac}[2]{\frac{\partial #1}{\partial #2}}
\newcommand{\op}{\odot}
\newcommand{\Eabs}{E_{\mathrm{abs}}}
\newcommand{\Erel}{E_{\mathrm{rel}}}
\newcommand{\Ediv}{\mathrm{div}}%\div是除号
\newcommand{\lrq}[1]{\left( #1 \right)}
\newcommand{\avint}[1]{\frac{1}{\left|#1\right|}\int_{#1}}

\newcommand{\upcite}[1]{\textsuperscript{\textsuperscript{\cite{#1}}}} 

\makeatletter
\newcommand\sixteen{\@setfontsize\sixteen{17pt}{6}}
\renewcommand{\maketitle}{\bgroup\setlength{\parindent}{0pt}
\begin{flushleft}
\sixteen\bfseries \@title
\medskip
\end{flushleft}
\texttt{\@author}
\egroup}
\renewcommand{\maketag@@@}[1]{\hbox{\m@th\normalsize\normalfont#1}}
\makeatother
\setlength{\abovecaptionskip}{0.cm}
\setlength{\floatsep}{0.cm}
\setlength{\intextsep}{0.cm}

%\CTEXsetup[format={\Large\bfseries}]{section}

\title{微分方程数值解\ 第1次作业}
\author{李之琪 22235056}

\begin{document}
\maketitle

\section*{1.1.1}
注意到$\dfrac{\partial^3}{\partial x^3}e^{i\omega x} =
-i\omega^3e^{i\omega x}, D_+^3 = h^{-3}(E^3 - 3E^2 + 3E - E^0)$，计算
得
\begin{eqnarray}
  \begin{aligned}
    \left|\left(D_+^3 - \dfrac{\partial^3}{\partial x^3}\right)e^{i\omega
        x}\right|=
    (-i\omega^3+O(\omega^4h)+i\omega^3)e^{i\omega x}=
    O(\omega^4h).
\end{aligned}
\end{eqnarray}
相应的数值测试如下：\\
\begin{table}[!htp]
    \centering\begin{tabular}{c|ccccc}
        \hline
         $h$&0.08&ratio&0.04&ratio&0.02\\
        \hline
         err &1.20e$-$1&1.00&6.00e$-$2&1.00&3.00e$-$2\\
         \hline
      \end{tabular}
    \caption{$D_+^3$关于$h$阶数测试，测试函数$\cos(\omega x)$，$x =
      0,\omega = 1$。}
    \label{tab:test11}
  \end{table}\\
  \begin{table}[!htp]
    \centering\begin{tabular}{c|ccccc}
        \hline
         $\omega$&1&ratio&0.5&ratio&0.25\\
        \hline
         err &1.20e$-$1&4.00&7.49e-3e$-$2&4.00&4.69e$-$4\\
        \hline
      \end{tabular}
    \caption{$D_+^3$关于$\omega$阶数测试，测试函数$\cos(\omega x)$，$x
      = 0, h = 0.08$。}
    \label{tab:test12}
  \end{table}\\
同理，对$D_-D_+^2$,有
\begin{eqnarray}
  \begin{aligned}
    \left|\left(D_-D_+^2 - \dfrac{\partial^3}{\partial x^3}\right)e^{i\omega
        x}\right|&= O(\omega^4h).\\
    \end{aligned}
\end{eqnarray}
\begin{table}[!htp]
    \centering\begin{tabular}{c|ccccc}
        \hline
         $h$&0.08&ratio&0.04&ratio&0.02\\
        \hline
         err &4.00e$-$2&1.00&2.00e$-$2&1.00&1.00e$-$2\\
         \hline
      \end{tabular}
    \caption{$D_-D_+^2$关于$h$阶数测试，测试函数$\cos(\omega x)$，$x =
      0,\omega = 1$。}
    \label{tab:test21}
  \end{table}\\
  \begin{table}[!htp]
    \centering\begin{tabular}{c|ccccc}
        \hline
         $\omega$&1&ratio&0.5&ratio&0.25\\
        \hline
         err &4.00e$-$2&4.00&2.50e-3e$-$2&4.00&1.56e$-$4\\
        \hline
      \end{tabular}
    \caption{$D_-D_+^2$关于$\omega$阶数测试，测试函数$\cos(\omega x)$，$x
      = 0, h = 0.08$。}
    \label{tab:test22}
  \end{table}\\
  类似地，
\begin{eqnarray}
  \begin{aligned}
    \left|\left(D_-^2D_+ - \dfrac{\partial^3}{\partial x^3}\right)e^{i\omega
        x}\right|&= O(\omega^4h),\\
    \left|\left(D_-^3 - \dfrac{\partial^3}{\partial x^3}\right)e^{i\omega
        x}\right|&= O(\omega^4h).\\
    \end{aligned}
\end{eqnarray}
由于$E$与$E^{-1}$的对称性，$D_-^2D_+,D_-^3$的行为与$D_-D_+^2,D_+^3$一
致，这里不再列出具体测试结果。最后，对$D_0D_+D_-$,有
\begin{eqnarray}
  \begin{aligned}
    \left|\left(D_0D_+D_- - \dfrac{\partial^3}{\partial x^3}\right)e^{i\omega
        x}\right|&= O(\omega^5h^2).
\end{aligned}
\end{eqnarray}
\begin{table}[!htp]
    \centering\begin{tabular}{c|ccccc}
        \hline
         $h$&0.08&ratio&0.04&ratio&0.02\\
        \hline
         err &1.60e$-$3&2.00&4.00e$-$4&2.00&1.00e$-$4\\
         \hline
      \end{tabular}
    \caption{$D_0D_+D_-$关于$h$阶数测试，测试函数$\sin(\omega x)$，$x =
      0,\omega = 1$。}
    \label{tab:test31}
  \end{table}\\
  \begin{table}[!htp]
    \centering\begin{tabular}{c|ccccc}
        \hline
         $\omega$&1&ratio&0.5&ratio&0.25\\
        \hline
         err &1.60e$-$3&5.00&5.00ee$-$5&5.00&1.56e$-$6\\
        \hline
      \end{tabular}
    \caption{$D_0D_+D_-$关于$\omega$阶数测试，测试函数$\sin(\omega x)$，$x
      = 0, h = 0.08$。}
    \label{tab:test32}
  \end{table}\\
\section*{1.1.3}
一方面，有
\begin{eqnarray}
  \begin{aligned}
   \left\|D_+D_- \right\|_h \le \left\|D_+ \right\|_h\left\|D_-
   \right\|_h = \frac{4}{h^2}.
\end{aligned}
\end{eqnarray}	
另一方面，考虑$u_j = (-1)^{j}$，则
\begin{eqnarray}
  \begin{aligned}
   \left\|D_+D_-u
   \right\|_h^2&=\sum_{j=0}^Nh\cdot
   \frac{1}{h^4}\left((-1)^{j+1}-2(-1)^j+(-1)^{j-1}\right)^2\\
   &= \frac{16(N+1)}{h^3} = \frac{16}{h^4}\left\|u\right\|_h^2.
\end{aligned}
\end{eqnarray}
故$\left\|D_+D_- \right\|_h = \dfrac{4}{h^2}$。
\end{document}

